<?php

namespace App\Http\Controllers\Counter;

use App\Http\Controllers\Controller;
use App\Http\Resources\Counter\OrderLogResource;
use App\Models\OrderLog;
use Illuminate\Http\Request;

class OrderLogsController extends Controller
{
    public function getLogs()
    {
        $logs = OrderLog::latest()->with([
            'order', 'orderItem', 'user'
        ])->paginate();

        return OrderLogResource::collection($logs);
    }
}
